﻿import QtQuick 2.0


Item{

    property string title: "title"
    property string info: "text"

    height: 50*dp; width: 300*dp
    // 标题
    Rectangle{
        id: rect_title
        height: parent.height; width: 100*dp
        color: "#DDD"
        Text{
            anchors.fill: parent
            anchors.leftMargin: 2*dp
            anchors.rightMargin: 2*dp
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            text: title
            wrapMode: Text.WrapAnywhere
            font.pixelSize: config.fontsize_a
        }
    }
    // 内容
    Rectangle{
        id: rect_content
        x: rect_title.width
        height: parent.height; width: parent.width - 100*dp
        color: "#FFF"
        Text{
            anchors.fill: parent
            anchors.leftMargin: 2*dp
            anchors.rightMargin: 2*dp
            horizontalAlignment: Text.AlignLeft
            verticalAlignment: Text.AlignVCenter
            text: info
            wrapMode: Text.WrapAnywhere
            font.pixelSize: config.fontsize_a
        }
    }
}
